<template>
  <Table v-if="isFlage == 0" @getBlack="getShow"></Table>
  <Detail v-else-if="isFlage == 1" @getBlack="getShow" :DataId="DataId"></Detail>
  <Agreement v-else="isFlage == 2" @getBlack="getShow" :DataId="DataId"></Agreement>
</template>

<script setup>
  import Detail from './model/detail.vue';
  import Table from './model/table.vue';
  import Agreement from './model/agreement.vue';
  import { ref } from 'vue';
  //0 表格
  //1 详情
  //2 协议

  const DataId = ref();
  const isFlage = ref(0);
  //控制表格切换
  function getShow(e) {
    console.log(e);
    isFlage.value = e.type;
    DataId.value = e.id;
  }
</script>

<style lang="scss" scoped></style>
